package routes

import (
	"tech-service/internal/controller"

	"github.com/gin-gonic/gin"
	"gorm.io/gorm"
)

type UserRouter struct {
	Router *gin.Engine
	DB     *gorm.DB
}

func NewUserRouter(router *gin.Engine, db *gorm.DB) *UserRouter {
	return &UserRouter{
		Router: router,
		DB:     db,
	}
}

func (r *UserRouter) SetupRoutes() {
	userController := controller.NewUserController(r.DB)
	userRouter := r.Router.Group("/user")
	userRouter.GET("/index", userController.Index)
}
